cc.Class({
    extends: cc.Component,

    properties: {

    },

    // LIFE-CYCLE CALLBACKS:

    // onLoad () {},

    start () {
        
        this.node.on(cc.Node.EventType.TOUCH_START,()=>{
                    this.node.stopAllActions()
                    this.node.runAction(cc.scaleTo(0.2,1.1,0.6))
        },this)
        this.node.on(cc.Node.EventType.TOUCH_END,()=>{
                    this.node.scaleY = 0.6
                    this.node.scaleX = 1.3
                    this.node.stopAllActions()
                    this.node.runAction(cc.scaleTo(1,1,1).easing(cc.easeElasticOut(0.2)))
        },this)
        this.node.on(cc.Node.EventType.TOUCH_CANCEL,()=>{
                    this.node.stopAllActions()
                    this.node.scaleY = 0.6
                    this.node.scaleX = 1.3
                    this.node.runAction(cc.scaleTo(1,1,1).easing(cc.easeElasticOut(0.2)))
        },this)
    },
    bump(){//deprecated

    },
    bump1(target,time,preiod){
        if(!time){
            time = 1
        }
        if(!preiod){
            preiod = 0.2
        }
        this.node.scaleY = 0.6
        this.node.scaleX = 1.3

        this.node.runAction(cc.scaleTo(time,1,1).easing(cc.easeElasticOut(preiod)))
    },

    // update (dt) {},
});
